import { useLoadingStore } from '@/store'
export default function useLoading() {
  const loading = computed(() => useLoadingStore().loading)
  const setLoading = (value: boolean) => {
    useLoadingStore().loading = value
  }
  const toggle = () => {
    useLoadingStore().loading = !useLoadingStore().loading
  }
  return {
    setLoading,
    toggle,
    loading,
  }
}
